package com.twu.biblioteca;

/**
 * Created by siba on 27/09/14.
 */
public class UserLogin {

    public User login() {
        String userDetails [] = new UserInput().getUserLoginDetails();
        User user = User.findUser(userDetails);

        if(user != null){
            new BibliotecaMessages(System.out).printMessage(Constants.LOGIN_SUCCESSFUL);
        }else{
            new BibliotecaMessages(System.out).printMessage(Constants.LOGIN_UNSUCCESSFUL);
        }
        return user;
    }
}
